﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiteratureManage.Domain.DataAccess
{
    public interface IDao<TKey, T> where T : class
    {
        TKey Create(T instance);
        void Delete(T instance);
        void DeleteAll();
        IList<T> GetAll();
        IList<T> GetAll(int firstRow, int maxRows);
        T LoadById(TKey id, bool shouldLock);
        T GetById(TKey id, bool shouldLock);
        void Save(T instance);
        void Update(T instance); 
    }
}
